package summer.server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author JIANG ZHEN X6978
 * @since  2020年7月16日 上午9:51:31
 *
 *
 */
public class MessageServer implements Runnable {

    private static final int CLIENT_MAX_NUMBER = 10;

    private int port;
    private ServerSocket serverSocket;
    private ExecutorService clientThreadPool = Executors.newFixedThreadPool(CLIENT_MAX_NUMBER);

    public MessageServer(int port) throws IOException {
        this.port = port;
        this.serverSocket = new ServerSocket(port);

        while(true) {
            Socket socket = this.serverSocket.accept();

        }
    }

    public void run() {
        // TODO Auto-generated method stub

    }


}
